<%@page import="model.VForum"%>
<%@page import="persistent.impl.ForumDAOImpl"%>
<%@page import="java.util.ArrayList"%>
<%@page import="java.util.List"%>
<%@page import="model.Vuser"%>
<%@page import="persistent.impl.UserDAOImpl"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ page  isELIgnored="false" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%
	request.setAttribute("xs", "sda");
	session.setAttribute("xs", "qqq");
	application.setAttribute("xs", "www");
	
	UserDAOImpl user = new UserDAOImpl();
	Vuser us =user.getVUserByID("zhangjs");
	session.setAttribute("name", us);
	
	String arys [] ={"小名","小李","小红","小米"};
	session.setAttribute("arys", arys);
	
	ForumDAOImpl four = new ForumDAOImpl();
	List list =four.getForumListByPage("zhangjs", 1, 10);
	session.setAttribute("list", list);
 %>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>EL表达式</title>
</head>
<body>
	<!--el表达式可以直接从JSP内置对象里取值  -->
	<p>4*6 = ${4*6}</p>
	<p>xs=${xs}</p>
	${not empty xs}
	${empty xs}
	${xs!=null}
	<br>
	<!-- 学习EL表达式如何输出对象的属性 -->
	${name.userid}<br>
	${name.agend }<br>
	${name.realname}<br>
	${name.signed }<br>
	${name.createtime }<br>
	
	<!-- 学习EL表达式输出数组值，输出集合框架类的值 -->
	${arys[0]},${arys[1]}
	
	<p>【${list[0].serilize}】${list[0].topic }</p>
	<p>【${list[1].serilize}】${list[1].topic }</p>
	<p>【${list[2].serilize}】${list[2].topic }</p>
	<p>【${list[3].serilize}】${list[3].topic }</p>
	<p>【${list[4].serilize}】${list[4].topic }</p>
	<p>【${list[5].serilize}】${list[5].topic }</p>
	<p>【${list[6].serilize}】${list[6].topic }</p>
	<p>【${list[7].serilize}】${list[7].topic }</p>
</body>
</html>